/* y = k * x + b */
#include <stdio.h>
int f(int k, int b, int x);
int main(int argc, const char *argv[])
{
	int k, b;
	while(~(scanf("%d %d",&k, &b)))
	{
		int i = 0;
		for(i = 1; i < 101; i++){
			printf("f(%d) = %d\n", i, f(k, b, i));
		}
	}
	return 0;
}
int f(int k, int b, int x)
{
	return k * x + b;
}
